//
//  UploadViewController.m
//  KeleAppProject
//
//  Created by 周岑 on 2018/1/16.
//  Copyright © 2018年 Cen Zhou. All rights reserved.
//

#import "UploadViewController.h"

#import "HaveCheckVC.h"
#import "WaitCheckVC.h"
#import "DenyCheckVC.h"

@interface UploadViewController ()<UIScrollViewDelegate>

@property (nonatomic, strong) NSArray *titleArray;
@property (nonatomic, strong) NSArray *controlerArray;

@end

@implementation UploadViewController


- (void)viewWillAppear:(BOOL)animated{
    [super viewWillAppear:animated];
    [self.navigationController setNavigationBarHidden:NO animated:YES];
}

- (void)viewWillDisappear:(BOOL)animated{
    [super viewWillDisappear:animated];
    [self.navigationController setNavigationBarHidden:YES animated:YES];
}


- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    self.navigationItem.leftBarButtonItem = [UIBarButtonItem itemWithImageName:@"icon_close" highImageName:@"icon_close" target:self action:@selector(back)];

    [self configureNavTitleViewWithDataSource:self.titleArray width:32 distance:30 notificationName:@"UploadScrollToIndex"];
    [self addChildControllersWithArray:self.controlerArray];
    [self loadSubviewsOnHomeWithScrollHeight:KLScreenH-NaviH y:0 titleArr:self.titleArray];
    
}

- (void)back{
    [self.navigationController popViewControllerAnimated:YES];
}

- (NSArray *)titleArray
{
    if (!_titleArray) {
        _titleArray = [NSArray arrayWithObjects:@"已审",@"待审",@"拒审", nil];
    }
    return _titleArray;
}

- (NSArray *)controlerArray{
    if (!_controlerArray) {
        _controlerArray = [NSArray arrayWithObjects:@"HaveCheckVC",@"WaitCheckVC",@"DenyCheckVC", nil];
    }
    return _controlerArray;
}


- (void)dealloc {
    NSLog(@"UploadViewController控制器被销毁了");
}


- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
